body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

table {
  margin-bottom: 20px;
}

main {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  min-height: 100vh;
}

.docs-container {
  padding: 0;

  @include shopify-breakpoint($desktop-up) {
    overflow: hidden;
    min-height: 600px;
  }
}

.docs-sidebar {
  @include shopify-breakpoint($tablet-down) {
    padding: 60px 30px 15px;
  }

  @include shopify-breakpoint($desktop-up) {
    min-height: 100%;
    width: 300px;
    padding: 60px 40px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding-bottom: 120px; // ~height of docs-shopify-logo
    overflow: auto;
  }
}

.docs-main {
  padding: 0 30px;

  @include shopify-breakpoint($desktop-up) {
    float: left;
    padding: 0 45px;
    width: calc(100% - 300px);
    margin-left: 300px;
  }
}

.docs-shopify-logo {

  img {
    margin-bottom: 10px;
    max-width: 100px;
  }

  @include shopify-breakpoint($tablet-down) {
    background: #232323;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 8px 30px;

    img {
      margin-bottom: 0;
      max-width: 80px;
    }

    p {
      display: none;
    }
  }

  @include shopify-breakpoint($desktop-up) {
    position: fixed;
    left: 40px;
    bottom: 0;
    width: 220px;
    background: #30373b;
    padding-top: 20px;
    padding-bottom: 40px;
  }

  p {
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
  }
}

.apidocs-container {
  @include shopify-breakpoint($desktop-up) {
    position: relative;
  }
}

.apidocs__sidebar {
  @include shopify-breakpoint($desktop-up) {
    width: 200px;
    position: absolute;
    right: 0;
    top: 0;
  }
}

.apidocs {
  @include shopify-breakpoint($desktop-up) {
    max-width: calc(100% - 200px);
    padding-right: 30px;
  }
}

.demo-iframe {
  position: relative;
  margin: 40px 0;

  &:before {
    content: "Demo";
    position: absolute;
    top: -10px;
    left: 10px;
    padding: 0 10px;
    background-color: white;
  }

  iframe {
    margin: 0;
    border: 1px solid $color-grey-border-on--white;
    transition: width 0.2s ease-in-out;
  }
}

.demo-iframe--mobile {
  width: 320px;
}

.demo-iframe__toggles {
  position: absolute;
  top: -10px;
  right: 20px;
  padding: 0 10px;
  background-color: white;

  .iframe-toggle + .iframe-toggle {
    margin-left: 5px;
  }

  img {
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
  }
}

.demo-image {
  box-shadow: 0 0 15px 5px #eee;
}

.demo-image.demo-image--app {
  margin-bottom: 0;
}
